<template>
  <c-loading :loading="loading">
    <view class="container article-info">
      <view class="html">
        <rich-text :nodes="info.content"></rich-text>
      </view>
    </view>
  </c-loading>
</template>
<script setup>
import { CLoading } from '@/components';
import { useLoading } from '@/hooks';
import { View, RichText } from '@tarojs/components';
import { setNavigationBarTitle } from '@tarojs/taro';
import HTMLParser from '@/utils/html';
import api from '@/api';
import { ref } from 'vue';

const info = ref({});
const { loading } = useLoading(async options => {
  var res = await api.bus.helperInfo(options);
  setNavigationBarTitle({
    title: res.title
  });
  res.content = HTMLParser(res.content);
  info.value = res;
});
</script>
<style lang="scss">
@import '@/style/html.scss';
</style>
